import request from "@/utils/request";

// 加入购物车
export const cartAddAPI = ({ skuId, count }) => {
  return request.post('/member/cart', {
    skuId,
    count
  })
}

// 获取购物车
export const cartListAPI = () => {
  return request.get('/member/cart')
}

// 删除购物车
export const cartDeleteAPI = (ids) => {
  return request({
    url: '/member/cart',
    method: 'DELETE',
    data: {
      ids
    }
  })
}

// 合并购物车列表
export const cartMergeAPI = (data) => {
  return request({
    url: '/member/cart/merge',
    method: 'POST',
    data
  })
}
